package com.example.designpattern.behavioral.command.command;

import com.example.designpattern.behavioral.command.component.Light;
import lombok.AllArgsConstructor;
import lombok.Data;

@AllArgsConstructor
@Data
public class LightOnCommand implements ICommand {

    private Light light;

    @Override
    public void execute() {
        light.lightOn();
    }

    @Override
    public void undo() {
        light.lightOff();
    }
}